import request from '@/utils/request'

// 查询部门列表
export function list(query) {
  return request({
    url: '/robot/list',
    method: 'get',
    params: query
  })
}


// 新增部门
export function add(data) {
  return request({
    url: '/robot/addServiceKledge',
    method: 'post',
    data: data
  })
}

// 查询活动详细
export function getOneById(knowledgeId) {
  return request({
    url: '/robot/getOneById',
    method: 'get',
    params:knowledgeId
  })

}


// 修改活动
export function updateServiceKledge(data) {
  return request({
    url: '/robot/updateServiceKledge/',
    method: 'post',
    data:data
  })

}



export function delServiceKledge(knowledgeId) {
  return request({
    url: '/robot/' +knowledgeId,
    method: 'delete',
  })

}


export function importTemplate() {
  return request({
    url: '/robot/importTemplate' ,
    responseType: 'blob',
    method: 'get',
  })

}


export function listServiceRecord(query) {
  return request({
    url: '/serviceRecor/list' ,
    method: 'get',
    params:query
  })}
